#include "unp.h"
#include "sum.h"

void str_echo(int fd)
{
    struct args arg;
    struct result res;

    while (1) {
/*
        if ((Readn(fd, &arg, sizeof(arg)), 0) == 0) {
            return;
        }
*/
        recv(fd, &arg, sizeof(arg), 0);
        res.sum = arg.arg1 + arg.arg2;
        Writen(fd, &res, sizeof(res));
    }
}

